Skip to content

Comments

Gera container#104

Open
LordOfPhys wants to merge 6 commits intoarhangeldim:masterfrom
LordOfPhys:gera-container
Open

Gera container#104
LordOfPhys wants to merge 6 commits intoarhangeldim:masterfrom
LordOfPhys:gera-container

Conversation

@LordOfPhys
Copy link

No description provided.

if (objByClassName.containsKey(className)) {
return objByClassName.get(className);
} else {
return getById(beanClass.get(className).getId());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

здесь тест падает с NPE. нужна проверка на существование бина

*/
public Object getById(String id) {
return null;
public boolean isDepend(String classN, Field[] declaredF) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

метод лучше сделать приватным. доступ к нему снаружи не нужен

field.setAccessible(true);
if (prop.getType().equals(ValueType.VAL)) {
Object value = Integer.parseInt(prop.getValue());
field.set(obj, value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В задании указано, что значения полей в объекте выставлять через методы setValue()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants